<?php

require("includes/basic.php");


//if(isset($_GET['id'])) {
   // $id=$_GET['id'];

    $query = "select * from client_logo";
    //echo $query;
    $result = mysql_query($query);
    while($row = mysql_fetch_array($result))
      {

       $data = $row['name'];
       $type = $row['type'];
	   $size = $row['size'];
		
		//echo "<img src='$data'/>";
		header("Content-type:".$type);
    header("Content-Length: ". $size);
    header("Content-Disposition: attachment; filename=\"{$data}\"");
		
die($data);

      }
     /* if ($type=="gif") $type = "gif";
      Header( "Content-type: $type");
     echo $data;*/
//}
?>